<style>
    .viewClass {
        background: #F5F5F5;
        border: 4px solid #E3E3E3;
        border-radius: 6px;
        padding: 6px;
        position: absolute;
        width: 350px;
        z-index: 100;
        margin-left: 30px;
        margin-top: -15px;
    }
</style>
<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ include file="/WEB-INF/jsp/commons/taglibs.jsp" %>
<!-- 分页显示演示开始 -->
<form id="listForm" class="well form-search" action="${ctx}/adoms/reback/dealReturnsList" method="get">
    <input type="hidden" name="pageNo" id="pageNo" value="${pageData.pagination.pageNo}"/>
    <input type="hidden" name="fieldName" id="fieldName" value="${pageData.compositor.fieldName}"/>
    <input type="hidden" name="compositorType" id="compositorType" value="${pageData.compositor.compositorType}"/>
    <table class="table table-striped table-bordered table-condensed">
        <tr align="center">
            <th>
                退单编号|退单名称
                <y:search fieldType="S" fieldList="name,code" matchType="LIKE" className="input-medium search-query"/>
                <button class="btn btn-small" onclick="search()" type="button">
                    <i class="icon-search"></i>
                    搜索
                </button>
            </th>
        </tr>
    </table>
</form>
<table class="table table-striped table-bordered table-condensed">
    <thead>
    <tr>
        <th>#</th>
        <th>
            <a href="javascript:sort('code')">退单编号</a>
        </th>
        <th>
            <a href="javascript:sort('orderInfo')">详情</a>
        </th>
        <th>
            <a href="javascript:sort('totalCost')">退单总价(元)</a>
        </th>
        <th>
            <a href="javascript:sort('orderCreateTime')">填单时间</a>
        </th>
        <th>
            <a href="javascript:sort('boxNumber')">总件数</a>
        </th>
        <th align="center">
            <a href="javascript:sort('fStatus')">订单状态</a>
        </th>
        <th>
            <a href="javascript:sort('department')">退货部门</a>
        </th>

        <th>
            <a href="javascript:sort('createUser')">填单人</a>
        </th>
        <th>
            <a href="javascript:sort('phone')">联系电话</a>
        </th>
        <th align="center">操作</th>
    </tr>
    </thead>
    <tbody>
    <c:forEach var="entity" items="${pageData.result}" varStatus="index">
        <tr
        <c:if test="${!entity.visible}">bgcolor="#AFEEEE"</c:if>>
        <td>${index.index + 1}</td>
        <td>${entity.code}</td>
        <td>
            <a to="#w${index.index }" view href="#"">查看</a>
            <div id="w${index.index }" class="viewClass hide">
                ${entity.orderInfo}
						<span class="close">
							<i class="icon-remove"></i>
						</span>
            </div>
        </td>
        <td class="tRed">
            <fmt:formatNumber value="${entity.totalCost}" pattern="###,###.##"></fmt:formatNumber>
        </td>
        <td>
            <fmt:formatDate value="${entity.orderCreateTime}" pattern="yyyy-MM-dd HH:mm:ss"/>
        </td>
        <td class="tRed">
            <fmt:formatNumber value="${entity.boxNumber}" pattern="###,##0.00"></fmt:formatNumber>
        </td>
        <td align="center">${entity.fStatus.v}</td>
        <td>${entity.department.name}</td>
        <td>${entity.createUser}</td>
        <td>${entity.phone}</td>
        <td align="center">
            <a href="${ctx}/adoms/reback/view/${entity.id}">查看</a>
        </td>
        </tr>
    </c:forEach>
    </tbody>
</table>
<%@ include file="/WEB-INF/jsp/commons/pager.jsp" %>
<script>
    $(function () {
        $("a[view]").click(function () {
            $(".viewClass[id!=" + $(this).attr("to") + "]").hide();
            $($(this).attr("to")).show("slow");
            return false;
        });
        $("div").on("click", function () {
            $(".viewClass").hide("slow");
        });
        $(".close").click(function () {
            $(this).parent().hide("slow");
        });
    });
</script>